/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.click.app.service.impl;

import com.click.app.dao.AsistanceControlDao;
import com.click.app.model.AsistanceControl;
import com.click.app.model.Employee;
import com.click.app.service.AsistanceControlManager;
import java.util.Date;
import java.util.List;

/** 
 *
 * @author org.@le
 */
public class AsistanceControlManagerImpl extends GenericManagerImpl<AsistanceControl, Long> implements AsistanceControlManager {

    AsistanceControlDao asistanceControlDao;

    public AsistanceControlManagerImpl(AsistanceControlDao asistanceControlDao) {
        super(asistanceControlDao);
        this.asistanceControlDao = asistanceControlDao;
    }

    public List<AsistanceControl> findByEmployee(Employee employee) {
        return asistanceControlDao.findByEmployee(employee);
    }

    public int sizeByEmployeePeriod(Employee employee, Date initDate, Date endDate) {
        return asistanceControlDao.sizeByEmployeePeriod(employee, initDate, endDate);
    }

    public boolean sizeByHalfEmployeePeriod(Employee employee, Date initDate, Date endDate) {
        return asistanceControlDao.sizeByHalfEmployeePeriod(employee, initDate, endDate);
    }

    public boolean dateExist(Employee employee, Date date) {
        return asistanceControlDao.dateExist(employee, date);
    }
}
